package com.gude.springboot.Controller;

import com.gude.springboot.Dao.UserMapper;
import com.gude.springboot.Models.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserMapper userMapper;

    @RequestMapping("/demo")
    public User get() {
        User user = userMapper.getUserById(2);
        return user;
    }

    @RequestMapping(value = "/res")
    public String df() {
        return "Hello";
    }



}
